<template>
    <div>
        <h3>当前的count值为：{{this.$store.state.count}}</h3>
    <button @click="sub">-1</button>
    </div>
</template>

<script>
    export default {
        name: 'Substraction',
        data(){
            return{

            }
        },
        methods:{
            sub(){
                this.$store.commit('sub');
            }
        }
    };
</script>

<style scoped>

</style>
